<link href="admin.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<{$config.weburl}>/script/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="<{$config.weburl}>/script/jquery.ui.js"></script>
<script type="text/javascript" src="<{$config.weburl}>/script/Validator.js"></script>
<div class="container">
<div class="oflow" style="height:480px">
<form name="form1" id="form1" action="module.php?m=product&s=order_opear.php&type=edit_shipped&orderid=<{$de.order_id}>" method="post">
<input name="id" type="hidden" id="id" value="<{$de.order_id}>">
<table class="table">
    <thead>
        <tr>
            <th class="partition" colspan="99">订单详情</th>
        </tr>
    </thead>
    <tbody>
    <tr>
        <td width="60">订单编号</td>
        <td colspan="3"><{$de.order_id}> <b class="org"><{$de.order_ship_status}></b></td>
    </tr>
    <tr>
        <td>下单时间</td>
        <td colspan="3"><{$de.create_time|date_format:"%Y-%m-%d&nbsp;%H:%M:%S"}></td>
    </tr>
    <tr>
        <td>配送方式：</td>
        <td width="200"><{$de.shipping_name}></td>
        <td width="60">配送费用:</td>
        <td><{$config.money}><{$de.freight}></td>
    </tr>
    
     <tr>
        <td>物流公司</td>
        <td colspan="3">
        <input type="hidden" name="shipping_express_id_old" value="<{$de.shipping_express_id}>"/>
        <select name="shipping_express_id" dataType="Require" msg="请选择物流公司">
        <option value="">--请选择--</option>
         <{foreach item=item key=key from=$shipping_express}>
            <option value="<{$item.id}>_<{$item.company}>" <{if $item.id == $de.shipping_express_id}>selected="selected"<{/if}>>
            <{$item.company}>
            </option>
        <{/foreach}>
        </select>
        </td>
    </tr>
    <tr>
        <td>物流单号</td>
        <td colspan="3"><input type="hidden" name="shipping_no_old" id="shipping_no_old" value="<{$de.shipping_no}>" /><input type="text" name="shipping_no" id="shipping_no" dataType="Require" msg="不能为空" class="w350" value="<{$de.shipping_no}>" /></td>
    </tr>
    <tr>
        <td>实际重量</td>
        <td colspan="3"><input type="text" name="shipping_weight" dataType="Double" msg="格式不正确" class="w350" value="<{$de.shipping_weight}>" />&nbsp;&nbsp;kg</td>
    </tr>
    <tr>
        <td>实际运费</td>
        <td colspan="3"><input type="text" name="shipping_freight" dataType="Double" msg="格式不正确" class="w350" value="<{$de.shipping_freight}>" /></td>
    </tr>
    <tr>
        <td>收货人</td>
        <td colspan="3">
        <input type="text" name="ship_name" id="ship_name" dataType="Require" msg="收货人不能为空" class="w350" value="<{$de.ship_name}>" />
        </td>
    </tr>
    <tr>
        <td>联系电话</td>
        <td colspan="3">
        <input type="text" name="ship_mobile" id="ship_mobile" dataType="Require" msg="联系电话不能为空" class="w350" value="<{$de.ship_mobile}>" />
        </td>
    </tr>
    <tr>
        <td>身份证号</td>
        <td colspan="3">
        <input type="text" name="shipping_idcard" id="shipping_idcard" dataType="Require" msg="身份证号不能为空" class="w350" value="<{$de.shipping_idcard}>" />
        </td>
    </tr>    
    <tr>
        <td>收货地址</td>
        <td colspan="3">
        <input type="text" name="ship_addr" id="ship_addr" dataType="Require" msg="收货地址不能为空" class="w350" value="<{$de.ship_addr}>" />
        </td>
    </tr>
    </tbody>
</table>
<div class="dialog_button">
	<input id="save" type="button" value="保存">
	<input name="act" type="hidden" id="action" value="edit_shipped"> 
	<input id="close" type="button" value="关闭">
</div>
</form>
<div id="error"></div> 
<script>
function $$(id) {
    return !id ? null : document.getElementById(id);
}
function ajaxpost(formid) {
    var ajaxframeid = 'ajaxframe';
    var ajaxframe = $$(ajaxframeid);
    if(!ajaxframe){
        var div = document.createElement('div');
        div.style.display = 'none';
        div.innerHTML = '<iframe name="' + ajaxframeid + '" id="' + ajaxframeid + '" loading="1"></iframe>';
        ajaxframe = $$(ajaxframeid);
        $$('append_parent').appendChild(div);
    }
    $$(formid).target = ajaxframeid;
    var valid = Validator.Validate($$(formid),3);
    if(!valid){
        return;
    }
    $$(formid).submit();
    window.parent.main.document.location.reload();
    setTimeout("DialogManager.close('order')",500);
}
$("#save").click(function () {
    ajaxpost("form1");
    return false;
});
$("#close").click(function () {
    window.parent.main.document.location.reload();
    DialogManager.close("order");
});
</script>
</form>
</div>
</div>